﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Ccit.OA.Email
{
    public interface IEmail
    {
        MsEmailDetails GetEmailDetails(string emailId);
        MsEmailDetails InsertEmail(MsEmailDetails msDetails);  //新增邮件
        MsEmailDetails UpdateEmail(MsEmailDetails msDetails);  //更新邮件
        bool DeleteEmail(MsEmailRecord msRecord);    //根据邮件ID删除指定邮件
        bool ClearEmail(MsEmailRecord MsRecord);     //清空个人邮件夹下边的所有邮件
        MsEmailPersonal InsertFolder(MsEmailPersonal msPerson); //新增邮件夹
        MsEmailPersonal GetFolderObject(MsEmailPersonal msPerson); //返回邮件夹信息
        bool UpdateFolder(MsEmailPersonal msPerson);  //更新邮件夹信息
        bool updateRecordState(MsEmailRecord msRecord);    //更新文件阅读状态
        bool updateRecordFind(MsEmailRecord msRecord);    //转移文件

        DataSet GetEmailFolderObject(string userId);
        bool DelEmailFolder(string folderId);              //删除邮件夹

        bool DeleteRecord(string userId, string folderId);

        MsEmailSpace GetEmailSpace(string userId);

        DataSet GetEmailList(MsEmailRecord msRecord);
        List<MsEmailPersonal> GetFolderData(MsEmailPersonal msPerson);

        DataSet GetEmailSigna(MsEmailSigna msSigna);  //返回签名信息
        MsEmailSigna InsertSigna(MsEmailSigna msSigna);     //插入签名记录
        bool UpdateSigna(MsEmailSigna msSigna);     //更新签名记录
        bool DelSigna(MsEmailSigna msSigna);        //删除签名记录

        MsEmailAccount GetAccount(MsEmailAccount msAccount);    //返回外部邮件信息
        DataSet GetAccountSet(MsEmailAccount msAccount);   //返回外部邮件信息集合
        MsEmailAccount InserAccount(MsEmailAccount msAccount);    //插入一个外部邮件信息
        bool UpdateAccount(MsEmailAccount msAccount);   //更新一个外部邮件信息
        bool DelAccount(MsEmailAccount msAccount);      //删除一个外部邮件信息



        DataSet GetSpaceObject(string collectionspace, string collectionremain);    //根据条件返回个人邮件空间设置 数据集合
        bool UpdateSpace(MsEmailSpace msSpace);         //跟新空间设置信息
        bool InserSpace(MsEmailSpace msSpace);          //插入邮件空间设置信息
        bool WebemlReciveLogo(string OnlyId);           //外部邮件接收标志

        List<MsEmailDetails> GetEmailData(string userId);
        string GetOAEmailData(string userId); //返回个人邮件信息 接口函数
    }
}
